package com.watson.s2sh.action;

import com.opensymphony.xwork2.ActionSupport;
import com.watson.s2sh.domain.Book;
import com.watson.s2sh.service.BookService;

public class BookAction extends ActionSupport {
	private static final long serialVersionUID = 1L;

	private Book book;
	
	private BookService BookService;
	
	public String openBookFormPage() throws Exception {
		System.out.println("open book page!");
		return SUCCESS;
	}
	
	public String saveBook() throws Exception {
		BookService.saveBook(book);
		System.out.println("open save successful!");
		return SUCCESS;
	}

	public Book getBook() {
		return book;
	}

	public void setBook(Book book) {
		this.book = book;
	}

	public BookService getBookService() {
		return BookService;
	}

	public void setBookService(BookService bookService) {
		BookService = bookService;
	}
}